<template>
	<view class="content">
		<!-- 用户头像header -->
		<view class="member-header">
			<view class="picker-header">
				<view class="herder-img">
					 <!-- v-if="hasLogin" -->
					 <image src="/static/my/header.png"></image>
					 <view class="header">
						 <view class="text_">{{ "突击的购物商城" }}</view>
						 <view class="id-num">
						 	ID 112312
						 </view>
					 </view>
				</view>
				<!-- <view  v-else class="herder-img">
					<image @click="toLogin"></image>
					<view>登录/注册</view>
				</view> -->
				<view class="item tc" v-for="(item,i) in order" :key="i" v-if="!item.unshowItem">
					<view class="" @click="navigateToHandle(item.router)">
						<view class="">
							<image class='cell-hd-icon' :src='item.icon'></image>
						</view>
					</view>
				</view>
				<view class="vip_" @tap="goVip">
					<image src="/static/my/vip.png"></image>双鱼会员
				</view>
			</view>
			<view class="see-focus" @tap="goBag">
				<view class="ma-bag">
					我的钱包
				</view>
				<view class="ma-num">
					<view style="display:flex;">
						<view class="icons">￥</view>56
					</view>
					<image src="/static/home/icon/arrows.png"></image>
				</view>
			</view>
		</view>
		<!-- 用户头像header -->
		<view v-if="false" class='member-top'>
			<image class='bg-img' src='/static/image/member-bg.png'></image>
			<view class='member-top-c'>
				<template v-if="hasLogin">
					<image class='user-head-img' mode="aspectFill" :src='userInfo.avatar'></image>
					<view class='user-name'>{{ userInfo.nickname }}</view>
					<view class="fz12 grade" v-if="userInfo.grade_name">
						{{userInfo.grade_name}}
					</view>
				</template>
				<template v-else>
					<!-- #ifdef H5 || APP-PLUS -->
					<image class='user-head-img' mode="aspectFill" :src='$store.state.config.shop_logo'></image>
					<view class="login-btn" @click="toLogin">
						登录/注册
					</view>
					<!-- #endif -->
					<!-- #ifdef MP-WEIXIN -->
					<view class="user-head-img">
						<open-data type="userAvatarUrl"></open-data>
					</view>
					<view>
						<button class="login-btn" hover-class="btn-hover" @click="goLogin()">授权登录</button>
					</view>
					<!-- #endif -->
					<!-- #ifdef MP-ALIPAY -->
					<view class="user-head-img"></view>
					<view>
						<button class="login-btn" open-type="getAuthorize" @click="getALICode" hover-class="btn-hover">授权登录</button>
					</view>
					<!-- #endif -->
					<!-- #ifdef MP-TOUTIAO -->
					<image class='user-head-img' mode="aspectFill" :src='$store.state.config.shop_logo'></image>
					<view class="login-btn" @click="goLogin()">
						登录/注册
					</view>
					<!-- #endif -->
				</template>

			</view>
		</view>
		<!-- 用户头像header end -->
		<!-- 我的订单 -->
		<view class="my-order-type">
			<view class="my-order" @click="orderNavigateHandle('../order/orderlist')">
				<view class="m-or">我的订单</view>
				<view class="t-or">全部订单</view>
			</view>
			<view class="type-list">
				<view v-for="(item, index) in orderItems" :key="index" @click="orderNavigateHandle('../order/orderlist', index + 1)">
					<view class="badges-x" v-if="item.nums">{{ item.nums }}</view>
					<view class="icon-image">
						<image :src='item.icon'></image>
					</view>
					<view>{{ item.name }}</view>
				</view>
			</view>
		</view>
		<view class="feature-list">
			<!-- <view class="list-details" v-for="(item,i) in utilityMenus" :key="i" 
			v-if="(!item.unshowItem && i != 'invoice') || (!item.unshowItem && i == 'invoice' && invoice_switch == 1)"
			 @click="navigateToHandle(item.router)">
				<view>{{ item.name }}</view>
				<view class="li_">
					<view>0积分</view>
					<image src="/static/image/right.png"></image>
				</view>
			</view> -->
			<view class="list-details" @click="myPromot">
				<view>我的推广</view>
				<view class="li_">
					<view></view>
					<image src="/static/image/right.png"></image>
				</view>
			</view>
			<view class="list-details" @click="myOrder">
				<view>我的订单</view>
				<view class="li_">
					<view></view>
					<image src="/static/image/right.png"></image>
				</view>
			</view>
			<view class="list-details" @click="shopAddress">
				<view>收获地址</view>
				<view class="li_">
					<view></view>
					<image src="/static/image/right.png"></image>
				</view>
			</view>
			<view class="list-details" @click="applyDedit">
				<view>申请借额</view>
				<view class="li_">
					<view></view>
					<image src="/static/image/right.png"></image>
				</view>
			</view>
			<view class="list-details" style="border:none;" @tap='applicationMerchant'>
				<view>申请成为商家</view>
				<view class="li_">
					<view></view>
					<image src="/static/image/right.png"></image>
				</view>
			</view>
		</view>
		<!-- end -->
		<!-- 其他功能菜单 -->
		<!-- 列表样式 -->
		<view class="" v-if="list == 1">
			<view class='cell-group margin-cell-group right-img'>
				<view class='cell-item' v-for="(item, index) in utilityMenus" :key="index" v-if="!item.unshowItem">
					<view class='cell-item-hd' @click="navigateToHandle(item.router)">
						<image class='cell-hd-icon' :src='item.icon'></image>
						<view class='cell-hd-title'>{{ item.name }}</view>
					</view>
					<view class='cell-item-ft'>
						<image class='cell-ft-next icon' src='/static/image/right.png'></image>
					</view>
				</view>
			</view>
			<view class='cell-group margin-cell-group right-img' v-if="isClerk">
				<view class='cell-item' v-for="(item, index) in clerk" :key="index">
					<view class='cell-item-hd' @click="navigateToHandle(item.router)">
						<image class='cell-hd-icon' :src='item.icon'></image>
						<view class='cell-hd-title'>{{ item.name }}</view>
					</view>
					<view class='cell-item-ft'>
						<image class='cell-ft-next icon' src='/static/image/right.png'></image>
					</view>
				</view>
			</view>
			<view class='cell-group margin-cell-group right-img' v-if="order">
				<view class='cell-item' v-for="(item, index) in order" :key="index">
					<view class='cell-item-hd' @click="navigateToHandle(item.router)">
						<image class='cell-hd-icon' :src='item.icon'></image>
						<view class='cell-hd-title'>{{ item.name }}</view>
					</view>
					<view class='cell-item-ft'>
						<image class='cell-ft-next icon' src='/static/image/right.png'></image>
					</view>
				</view>
				<!-- #ifdef H5 || APP-PLUS-NVUE || APP-PLUS -->
				<view class='cell-item'>
					<view class='cell-item-hd' @click="showChat()">
						<image class='cell-hd-icon' src='/static/image/me-ic-phone.png'></image>
						<view class='cell-hd-title'>联系客服</view>
					</view>
					<view class='cell-item-ft'>
						<image class='cell-ft-next icon' src='/static/image/right.png'></image>
					</view>
				</view>
				<!-- #endif -->
				<!-- #ifdef MP-WEIXIN -->
				<view class='cell-item'>
					<button class="cell-item-hd " hover-class="none" open-type="contact" bindcontact="showChat" :session-from="kefupara">
						<image src='/static/image/me-ic-phone.png' class='cell-hd-icon'></image>
						<view class='cell-hd-title'>联系客服</view>
					</button>
					<view class='cell-item-ft'>
						<image class='cell-ft-next icon' src='/static/image/right.png'></image>
					</view>
				</view>
				<!-- #endif -->
				<!-- #ifdef MP-TOUTIAO -->
				<view class='cell-item'>
					<button class="cell-item-hd " hover-class="none" open-type="contact" bindcontact="showChat" :session-from="kefupara">
						<image src='/static/image/me-ic-phone.png' class='cell-hd-icon'></image>
						<view class='cell-hd-title'>联系客服</view>
					</button>
					<view class='cell-item-ft'>
						<image class='cell-ft-next icon' src='/static/image/right.png'></image>
					</view>
				</view>
				<!-- #endif -->
				<!-- #ifdef MP-ALIPAY -->
				<view class='cell-item'>
					<contact-button icon="/static/image/kefu2.png" size="170rpx*76rpx" tnt-inst-id="WKPKUZXG" scene="SCE00040186"
					 class="cell-item-hd " hover-class="none" />
					<view class='cell-item-ft'>
						<image class='cell-ft-next icon' src='/static/image/right.png'></image>
					</view>
				</view>
				<!-- #endif -->
			</view>
			
		</view>
	</view>
</template>


<script>
	import {
		checkLogin
	} from '@/config/mixins.js'
	export default {
		components: {
		
		},
		mixins: [checkLogin],
		data() {
			return {
				open_id: '',
				hasLogin: false,
				userInfo: {}, // 用户信息
				kefupara: '', //客服传递资料
				afterSaleNums: 0,
				isClerk: false,
				alipayNoLogin: true,
				alipayName: '',
				alipayAvatar: '',
				config:'',//配置信息
				orderItems: [{
						name: '待付款',
						icon: '/static/my/daifukuan.png',
						nums: 0
					},

					{
						name: '待发货',
						icon: '/static/my/daishouhuo.png',
						nums: 0
					},
					{
						name: '待评价',
						icon: '/static/my/pingjia.png',
						nums: 0
					},
					{
						name: '售后/退款',//待发货
						icon: '/static/my/shouhou.png',
						nums: 0
					},
				],
				utilityMenus: {
					// distribution: {
					// 	name: '分销中心',
					// 	icon: '/static/image/distribution.png',
					// 	router: '../distribution/user',
					// 	unshowItem: false
					// },
					// coupon: {
					// 	name: '我的优惠券',
					// 	icon: '/static/image/ic-me-coupon.png',
					// 	router: '../coupon/index',
					// 	unshowItem: false
					// },
					// balance: {
					// 	name: '我的余额',
					// 	icon: '/static/image/ic-me-balance.png',
					// 	router: '../balance/index',
					// 	unshowItem: false
					// },
					// invoice: {
					// 	name: '我的发票',
					// 	icon: '/static/image/ic-me-invoice.png',
					// 	router: '../invoice/index',
					// 	unshowItem: false
					// },
					integral: {
						name: '我的积分',
						icon: '/static/image/integral.png',
						router: '../integral/index',
						unshowItem: false
					},
					address: {
						name: '我的地址',
						icon: '/static/image/me-ic-site.png',
						router: '../address/list',
						unshowItem: false
					},
					// collection: {
					// 	name: '我的收藏',
					// 	icon: '/static/image/ic-me-collect.png',
					// 	router: '../collection/index',
					// 	unshowItem: false
					// },
					// history: {
					// 	name: '我的足迹',
					// 	icon: '/static/image/ic-me-track.png',
					// 	router: '../history/index',
					// 	unshowItem: false
					// },
					
				},
				clerk: [
				],
				order: {
					invite: {
						name: '邀请好友',
						icon: '/static/image/ic-me-invite.png',
						router: '../invite/index',
						unshowItem: true
					},
					setting: {
						name: '系统设置',
						icon: '/static/my/shezhi.png',
						router: '../setting/index',
						unshowItem: false
					}
				},
				list: 2,
                suTipStatus: false
			}
		},
		onShow() {
			this.initData()
		},
		methods: {
			// 我的订单
			myOrder(){
				uni.navigateTo({
					url:'/pages/member/order/orderlist'
				})
			},
			// 申请借额
			applyDedit(){ 
				uni.reLaunch({
					url:'/pages/friend/index/index'
				})
				
			},
			// 申请成为商家
			applicationMerchant(){
				uni.navigateTo({
					url:'/pages/member/applicationMerchant/applicationMerchant'
				})
			},
			// 钱包
			goBag(){
				uni.navigateTo({
					url:'/pages/member/maturity_value/maturity_value'
				})
			},
			// 会员
			goVip(){
				uni.navigateTo({
					url:'/pages/member/vip/vip'
				})	
			},
			// 我的推广
			myPromot(){
				uni.navigateTo({
					url:'/pages/member/myPromot/index/index'
				})
			},
			// 收获地址
			shopAddress(){
				uni.navigateTo({
					url:'../address/list'
				})
			},
			goLogin(){
				uni.navigateTo({
					url:'/pages/login/choose/index'
				})
			},
			getUserInfo(e) {
				let _this = this
				//return false;
				if (e.detail.errMsg == 'getUserInfo:fail auth deny') {
					_this.$common.errorToShow('未授权')
				} else {
					var data = {
						open_id: _this.open_id,
						iv: e.detail.iv,
						edata: e.detail.encryptedData,
						signature: e.detail.signature
					}
					//有推荐码的话，带上
					var invitecode = _this.$db.get('invitecode')
					if (invitecode) {
						data.invitecode = invitecode
					}
					_this.toWxLogin(data)
				}
			},
			getALICode() {
				let that = this
				uni.login({
					scopes: 'auth_user',
					success: (res) => {
						if (res.authCode) {
							uni.getUserInfo({
								provider: 'alipay',
								success: function(infoRes) {
									if (infoRes.errMsg == "getUserInfo:ok") {
										let user_info = {
											'nickname': infoRes.nickName,
											'avatar': infoRes.avatar
										}
										that.aLiLoginStep1(res.authCode, user_info);
									}
								},
								fail: function(errorRes) {
									this.$common.errorToShow('未取得用户昵称头像信息');
								}
							});
						} else {
							this.$common.errorToShow('未取得code');
						}
					},
					fail: function(res) {
						this.$common.errorToShow('用户授权失败my.login');
					}
				});
			},
			getWxCode() {
				let that = this
				uni.login({
					scopes: 'auth_user',
					success: function(res) {
						if (res.code) {
							that.wxLoginStep1(res.code)
						} else {
							this.$common.errorToShow('未取得code')
						}
					},
					fail: function(res) {
						this.$common.errorToShow('用户授权失败wx.login')
					}
				})
			},
			wxLoginStep1(code) {
				this.$api.login1({
					code
				}, res => {
					if (res.status) {
						this.open_id = res.data
					} else {
						this.$common.errorToShow(res.msg, function() {
							uni.navigateBack({
								delta: 1
							})
						})
					}
				})
			},
			aLiLoginStep1(code, user_info) {
				let data = {
					'code': code,
					'user_info': user_info
				}
				this.$api.alilogin1(data, res => {
					this.alipayNoLogin = false;
					if (res.status) {
						this.open_id = res.data.user_wx_id
						//判断是否返回了token，如果没有，就说明没有绑定账号，跳转到绑定页面
						if (!res.data.hasOwnProperty('token')) {
							this.$common.redirectTo('/pages/login/login/index?user_wx_id=' + res.data.user_wx_id);
						} else {
							this.$db.set('userToken', res.data.token)
							this.initData()
						}
					} else {
						this.$common.errorToShow(res.msg)
					}
				})
			},
			toWxLogin(data) {
				let _this = this
				_this.$api.login2(data, function(res) {
					if (res.status) {
						//判断是否返回了token，如果没有，就说明没有绑定账号，跳转到绑定页面
						if (typeof res.data.token == 'undefined') {
							uni.redirectTo({
								url: '/pages/login/login/index?user_wx_id=' + res.data.user_wx_id
							})
						} else {
							_this.$db.set('userToken', res.data.token)
							_this.initData()
						}
					} else {
						_this.$common.errorToShow('登录失败，请重试')
					}
				})
			},
			// toLogin() {
			// 	this.$common.navigateTo('../../login/login/index1')
			// },
			initData() {
				console.log('this.$db.get',this.$db.get('userToken'))
				// 获取用户信息
				var _this = this
				//判断是开启分销还是原始推广
				// this.$api.shopConfig(res => {
				// 	this.config = res;
				// 	if (res.open_distribution) {
				// 		this.order.invite.unshowItem = true
				// 	} else {
				// 		this.utilityMenus.distribution.unshowItem = true
				// 		this.order.invite.unshowItem = false
				// 	}
				// })
				if (this.$db.get('userToken')) {
					this.hasLogin = true
					// this.$api.userInfo({}, res => {
					// 	if (res.status) {
					// 		_this.userInfo = res.data
					// 		// #ifdef MP-WEIXIN
					// 		//微信小程序打开客服时，传递用户信息
					// 		var kefupara = {}
					// 		kefupara.nickName = res.data.nickname
					// 		kefupara.tel = res.data.mobile
					// 		_this.kefupara = JSON.stringify(kefupara)
					// 		// #endif
					// 		// 获取订单不同状态的数量
					// 		let data = {
					// 			ids: '1,2,3,4',
					// 			isAfterSale: true
					// 		}
					// 		_this.$api.getOrderStatusSum(data, res => {
					// 			if (res.status) {
					// 				_this.orderItems.forEach((item, key) => {
					// 					item.nums = res.data[key + 1]
					// 				})
					// 				_this.afterSaleNums = res.data.isAfterSale ?
					// 					res.data.isAfterSale :
					// 					0
					// 			}
					// 		})
					// 		//判断是否是店员
					// 		// this.$api.isStoreUser({}, res => {
					// 		// 	this.isClerk = res.flag
					// 		// })
					// 	}
					// })
				} else {
					this.$common.navigateTo('/pages/login/login/index1');
					this.hasLogin = false
					// #ifdef MP-WEIXIN
					this.getWxCode()
					// #endif
				}
                
                // this.userIsSubscription();
			},
			navigateToHandle(pageUrl) {
				if (!this.hasLogin) {
					// return this.checkIsLogin()
				}
				this.$common.navigateTo(pageUrl)
			},
			orderNavigateHandle(url, tab = 0) {
				if (!this.hasLogin) {
					// return this.checkIsLogin()
				}
				this.$store.commit('orderTab', tab)
				this.$common.navigateTo(url)
			},
			goAfterSaleList() {
				if (!this.hasLogin) {
					// return this.checkIsLogin()
				}
				this.$common.navigateTo('../after_sale/list')
			},
			//在线客服,只有手机号的，请自己替换为手机号
			showChat() {
				// #ifdef H5
				let _this = this
				window._AIHECONG('ini', {
					entId: this.config.ent_id,
					button: false,
					appearance: {
						panelMobile: {
							tone: '#FF7159',
							sideMargin: 30,
							ratio: 'part',
							headHeight: 50
						}
					}
				})
				//传递客户信息
				window._AIHECONG('customer', {
					head: _this.userInfo.avatar,
					'名称': _this.userInfo.nickname,
					'手机': _this.userInfo.mobile
				})
				window._AIHECONG('showChat')
				// #endif

				// 打开客服页面
				// #ifdef APP-PLUS || APP-PLUS-NVUE
				this.$common.navigateTo('../customer_service/index');
				// #endif
				
				// 头条系客服
				// #ifdef MP-TOUTIAO
				if(this.shopMobile != 0){
					let _this = this;
					tt.makePhoneCall({
						phoneNumber: this.shopMobile.toString(),
						success(res) {},
						fail(res) {}
					});
				}else{
					_this.$common.errorToShow('暂无设置客服电话');
				}
				// #endif
			},
			// toPages(url) {
			// 	console.log(url)
			// 	let userToken = this.$db.get('userToken')
			// 	if (!userToken) {
			// 		common.jumpToLogin()
			// 		return false
			// 	} else {
			// 		this.$common.navigateTo(url)

			// 	}
			// },
            //查询用户订阅
            // userIsSubscription() {
            //     let userToken = this.$db.get("userToken");
            //     if (userToken && userToken != '') {
            //     	this.$api.subscriptionIsTip(res => {
            //             if (res.status) {
            //                 if (res.switch) {
            //                     this.suTipStatus = true;
            //                 } else {
            //                     this.suTipStatus = false;
            //                 }
            //             } else {
            //                 this.suTipStatus = true;
            //             }
            //     	});
            //     } else {
            //         this.suTipStatus = true;
            //     }
            // },
		},
		computed: {
			// 获取店铺联系人手机号
			// shopMobile(){
			// 	return this.$store.state.config.shop_mobile || 0;
			// },
			// invoice_switch() {
			// 	return this.$store.state.config.invoice_switch || 2;
			// },
			// store_switch() {
			// 	return this.$store.state.config.store_switch || 0;
			// },
   //          isTip() {
   //              return this.suTipStatus;
   //          }
		},
		watch: {}
	}
</script>

<style lang="less">
	// 头像header
	
	.member-header {
		margin-top: 32rpx;
		width:686rpx;
		height:304rpx;
		margin:32rpx auto 24rpx auto;
		background:rgba(255,255,255,1);
		border-radius:16rpx;
		.picker-header {
			display:flex;
			justify-content: space-between;
			border-bottom:1px solid rgba(245,245,245,1);
			position:relative;
			.vip_ {
				position: absolute;
				top:104rpx;
				right:0;
				background:#F0BE58;
				border-radius:30rpx 0px 0px 30rpx;
				font-size:24rpx;
				font-family:PingFangSC-Medium,PingFang SC;
				font-weight:500;
				color:rgba(255,255,255,1);
				width: 159rpx;
				height: 45rpx;
				line-height: 45rpx;
				text-align: center;
				image {
					vertical-align: middle;
					width: 23rpx;
					height: 23rpx;
					margin-right:5rpx;
					margin-bottom:6rpx;
				}
			}
			.herder-img {
				display:flex;
				font-family:PingFangSC-Medium,PingFang SC;
				image {
					width: 100rpx;
					height: 100rpx;
					background-color: #FFFFFF;
					border-radius: 50%;
					margin-top:54rpx;
					margin-left:32rpx;
					margin-bottom:24rpx;
				}
				.header {
					margin-top:58rpx;
					margin-left:12rpx;
					font-size:32rpx;
					font-weight:500;
					color:rgba(51,51,51,1);
					.id-num {
						margin-top:7rpx;
						font-size:24rpx;
						font-weight:500;
						color:rgba(109,114,120,1);
					}
				}
				// view {
				// 	font-size:32rpx;
				// 	margin-left:24rpx;
				// 	padding-top: 48rpx;
				// 	font-family:PingFangSC-Medium,PingFang SC;
				// 	font-weight:500;
				// 	color:rgba(51,51,51,1);
				// 	// line-height:45rpx;
				// }
			}
			
			.cell-hd-icon {
				width: 44rpx;
				height: 44rpx;
				margin:28rpx 32rpx 0 0;
			}
		}
		.see-focus {
			display:flex;
			justify-content: space-between;
			padding:0rpx 36rpx 0rpx 34rpx;
			height:114rpx;
			line-height:114rpx;
			.ma-bag {
				font-size:24rpx;
				font-family:PingFangSC-Regular,PingFang SC;
				font-weight:400;
				color:rgba(51,51,51,1);
			}
			.ma-num {
				font-size:48rpx;
				font-family:PingFangSC-Medium,PingFang SC;
				font-weight:500;
				color:rgba(255,94,77,1);
				display:flex;
				.icons {
					margin-right:-10rpx;
				}
				image {
					display:block;
					height: 36rpx;
					width: 36rpx;
					margin-top:40rpx;
					margin-left:6rpx;
				}
			}
		}
	}
	
	// 我的订单
	.my-order-type {
		width:686rpx;
		height:258rpx;
		background:rgba(255,255,255,1);
		border-radius:16rpx;
		margin:0 auto 32rpx auto;
		.my-order {
			display:flex;
			padding-bottom:22rpx;
			justify-content: space-between;
			padding:24rpx 32rpx;
			border-bottom: 1px solid rgba(245,245,245,1);;
			.m-or {
				font-size:28rpx;
				font-family:PingFangSC-Medium,PingFang SC;
				font-weight:500;
				color:rgba(51,51,51,1);
			}
			.t-or {
				font-size:24rpx;
				font-family:PingFangSC-Regular,PingFang SC;
				font-weight:400;
				color:rgba(128,128,128,1);
			}
		}
		.type-list {
			display:flex;
			justify-content: space-around;
			position: relative;
			view {
				.badges-x {
					width:36rpx;
					height: 36rpx;
					border-radius:50%;
					line-height:36rpx;
					text-align:center;
					color:#FFFFFF;
					position: absolute;
					left: 80upx;
					top: 10upx;
					background:#FF7159;
					opacity: 1;
				}
				.icon-image {
					margin-top:24rpx;
					font-size:26rpx;
					font-family:PingFangSC-Regular,PingFang SC;
					font-weight:400;
					color:rgba(102,102,102,1);
					image {
						margin:auto;
						display:block;
						width: 72rpx;
						height: 72rpx;
						margin-bottom:6rpx;
					}
					
				}
			}
		}
	}
	
	// end
	// <!-- 我的积分 地址 设置 -->
	.feature-list {
		width:686rpx;
		background:rgba(255,255,255,1);
		border-radius:16rpx;
		margin:24rpx auto 0 auto;
		.list-details {
			display: flex;
			justify-content: space-between;
			margin:0rpx 32rpx;
			padding:24rpx 0;
			border-bottom:1px solid #F5F5F5;
			view {
				font-size:28rpx;
				font-family:PingFangSC-Medium,PingFang SC;
				font-weight:500;
				color:rgba(51,51,51,1);
			}
			.li_ {
				font-size:24px;
				font-family:PingFangSC-Regular,PingFang SC;
				font-weight:400;
				color:rgba(128,128,128,1);
				display:flex;
				view {
					font-size:24rpx;
					font-family:PingFangSC-Regular,PingFang SC;
					font-weight:400;
					color:rgba(128,128,128,1);
				}
			}
			image {
				width:36rpx;
				height: 36rpx;
			
			}
		}
	}
	// end
	.member-top {
		position: relative;
		width: 100%;
		height: 340upx;
	}

	.bg-img {
		position: absolute;
		width: 100%;
		height: 100%;
	}

	.member-top-c {
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		text-align: center;
	}

	.user-head-img {
		display: block;
		width: 160upx;
		height: 160upx;
		border-radius: 50%;
		overflow: hidden;
		background-color: rgba(255, 255, 255, 0.7);
		margin: 0 auto 16upx;
	}

	.user-name {
		font-size: 30upx;
		color: #fff;
		margin-bottom: 16upx;
	}

	.grade {
		color: #FFF;
	}

	.member-grid {
		background-color: #fff;
		border-top: 2upx solid #eee;
		padding: 20upx 0;
	}

	.margin-cell-group {
		margin: 20upx 0;
		color: #666666;
	}

	.badge {
		left: 80upx;
		top: -6upx;
	}

	button.cell-item-hd {
		background-color: #fff;
		padding: 0;
		line-height: 1.4;
		color: #333;
	}

	button.cell-item-hd:after {
		border: none;
	}

	.login-btn {
		color: #fff;
		width: 180upx;
		height: 50upx;
		line-height: 50upx;
		border-radius: 25upx;
		background: #ff7159;
		font-size: 12px;
	}
	
	.sale-block {
		padding: 0 20upx;
		margin-bottom: 20upx;

		.sale-title {
			height: 72rpx;
			line-height: 72rpx;
			border-bottom: 2rpx solid #f0f0f0;
			display: flex;
			align-items: center;
			.iconfont {
				margin-right: 12upx;
				// color: $theme-color;
			}
		}

		.sale-list {
			justify-content: flex-start;
			flex-wrap: wrap;

			.item {
				width: 25%;
				padding: 20upx 0;

				.iconfont {
					font-size: 40upx;
					color: #5e5e5e;
				}

				.text {
					margin-top: 12upx;
					color: #4d4d4d;
					font-size: 24rpx;
				}
			}
			.tc {
			    text-align: center;
				.cell-hd-icon{
					float: none;
					width: 60rpx;
					height: 60rpx;
					margin: 0;
				}
			}
		}
	}
</style>
